<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     * 
     */
    public function index()
    {
        $config = model('Config')->where(['group'=>'user', 'name'=>'is_pwd'])->find();
        
        if(!$config){
            $this->error('后台还未配置');
        }
                
        $this->success(__('Success'), [$config['name'] => $config['value']]);
    }
    
}
